package com.example.tutormanagement.service.impl;

import com.example.tutormanagement.mapper.ChargeMapper;
import com.example.tutormanagement.pojo.Charge;
import com.example.tutormanagement.service.ChargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * &#064;Date: 23/06/14-15:37
 * &#064;Description:
 */
@Service
public class ChargeServiceImpl implements ChargeService {

    @Autowired
    private ChargeMapper chargeMapper;

    @Override
    public List<Charge> list() {
        return chargeMapper.list();
    }

    @Override
    public void update(Charge charge, String id) {
        charge.setPid(id);
        chargeMapper.update(charge);
    }

    @Override
    public void insert(Charge charge) {
        chargeMapper.insert(charge);
    }

    @Override
    public Charge select(String id) {
        return chargeMapper.select(id);
    }

    @Override
    public void delete(String id) {
        chargeMapper.delete(id);
    }

}
